﻿﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Xml.Serialization;
using Fcdbas.Core;
using Fcdbas.Core.Configuration;
using Fcdbas.Core.DataAccess;


namespace Fcdbas.Biz
{
    /// <summary></summary>
    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("fnd_vpd_policy_tab", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class fnd_vpd_policy : Entity<fnd_vpd_policy>,Ifnd_vpd_policy
    {
        #region 属性
 
        private String _object_name;

        /// <summary>FLAGS=KMI-L^FORMAT=Uppercase^DATATYPE=String^PROMPT=对象^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
        [DisplayName("对象")]
        [Description("FLAGS=KMI-L^FORMAT=Uppercase^DATATYPE=String^PROMPT=对象^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(1, "object_name",  null, "varchar(50)", 0, 0, false)]

        public virtual String object_name

        {
            get { return _object_name; }
            set { if (OnPropertyChanging(__.object_name, value)) { _object_name = value; OnPropertyChanged(__.object_name); } }
        }

 
        private String _user_id;

        /// <summary>FLAGS=KMI-L^FORMAT=Lowercase^DATATYPE=String^PROMPT=用户^LENGTH=40^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
        [DisplayName("用户")]
        [Description("FLAGS=KMI-L^FORMAT=Lowercase^DATATYPE=String^PROMPT=用户^LENGTH=40^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^")]
        [DataObjectField(false, false, false, 40)]
        [BindColumn(2, "user_id",  null, "varchar(40)", 0, 0, false)]

        public virtual String user_id

        {
            get { return _user_id; }
            set { if (OnPropertyChanging(__.user_id, value)) { _user_id = value; OnPropertyChanged(__.user_id); } }
        }

 
        private String _where_clause;

        /// <summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=查询条件^LENGTH=2000^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
        [DisplayName("查询条件")]
        [Description("FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=查询条件^LENGTH=2000^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^")]
        [DataObjectField(false, false, false, 2000)]
        [BindColumn(3, "where_clause",  null, "varchar(2000)", 0, 0, false)]

        public virtual String where_clause

        {
            get { return _where_clause; }
            set { if (OnPropertyChanging(__.where_clause, value)) { _where_clause = value; OnPropertyChanged(__.where_clause); } }
        }

 
        private String _description;

        /// <summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=描述^LENGTH=200^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
        [DisplayName("描述")]
        [Description("FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=描述^LENGTH=200^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^")]
        [DataObjectField(false, false, false, 200)]
        [BindColumn(4, "description",  null, "varchar(200)", 0, 0, false)]

        public virtual String description

        {
            get { return _description; }
            set { if (OnPropertyChanging(__.description, value)) { _description = value; OnPropertyChanged(__.description); } }
        }

 
        private String _actived;

        /// <summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=激活^LENGTH=5^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
        [DisplayName("激活")]
        [Description("FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=激活^LENGTH=5^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^")]
        [DataObjectField(false, false, false, 5)]
        [BindColumn(5, "actived",  null, "varchar(5)", 0, 0, false)]

        public virtual String actived

        {
            get { return _actived; }
            set { if (OnPropertyChanging(__.actived, value)) { _actived = value; OnPropertyChanged(__.actived); } }
        }

 
        private String _note_text;

        /// <summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=备注^LENGTH=2000^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
        [DisplayName("备注")]
        [Description("FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=备注^LENGTH=2000^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^")]
        [DataObjectField(false, false, true, 2000)]
        [BindColumn(6, "note_text",  null, "varchar(2000)", 0, 0, false)]

        public virtual String note_text

        {
            get { return _note_text; }
            set { if (OnPropertyChanging(__.note_text, value)) { _note_text = value; OnPropertyChanged(__.note_text); } }
        }

 
        private String _objid;

        /// <summary></summary>
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(true, false, false, 50)]
        [BindColumn(7, "rowid",  null, "varchar(50)", 0, 0, false)]

        public virtual String rowid

        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }


        private DateTime? _objversion;

        /// <summary></summary>
        [DisplayName("Objversion")]
        [Description("")]
        [DataObjectField(false, false, true, 24)]
        [BindColumn(8, "rowversion",  null, "datetime", 0, 0, false)]

        public virtual DateTime? rowversion

        {
            get { return _objversion; }
            set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        /// <summary>
        /// 获取/设置 字段值。
        /// 一个索引，基类使用反射实现。
        /// 派生实体类可重写该索引，以避免反射带来的性能损耗
        /// </summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.object_name : return _object_name;
                    case __.user_id : return _user_id;
                    case __.where_clause : return _where_clause;
                    case __.description : return _description;
                    case __.actived : return _actived;
                    case __.note_text : return _note_text;
                    case __.objid : return _objid;
                    case __.objversion : return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.object_name : 
                        if(value != null)
                            _object_name = Convert.ToString(value);
                        else
                            _object_name = null;
                    break;
                    case __.user_id : 
                        if(value != null)
                            _user_id = Convert.ToString(value);
                        else
                            _user_id = null;
                    break;
                    case __.where_clause : 
                        if(value != null)
                            _where_clause = Convert.ToString(value);
                        else
                            _where_clause = null;
                    break;
                    case __.description : 
                        if(value != null)
                            _description = Convert.ToString(value);
                        else
                            _description = null;
                    break;
                    case __.actived : 
                        if(value != null)
                            _actived = Convert.ToString(value);
                        else
                            _actived = null;
                    break;
                    case __.note_text : 
                        if(value != null)
                            _note_text = Convert.ToString(value);
                        else
                            _note_text = null;
                    break;
                    case __.objid : 
                        if(value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                    break;
                    case __.objversion : 
                        if(value != null)
                            _objversion = Convert.ToDateTime(value);
                        else
                            _objversion = null;
                    break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得字段信息的快捷方式</summary>
        public class _
        {
            ///<summary>FLAGS=KMI-L^FORMAT=Uppercase^DATATYPE=String^PROMPT=对象^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public static readonly Field object_name = FindByName(__.object_name);

            ///<summary>FLAGS=KMI-L^FORMAT=Lowercase^DATATYPE=String^PROMPT=用户^LENGTH=40^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public static readonly Field user_id = FindByName(__.user_id);

            ///<summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=查询条件^LENGTH=2000^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public static readonly Field where_clause = FindByName(__.where_clause);

            ///<summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=描述^LENGTH=200^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public static readonly Field description = FindByName(__.description);

            ///<summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=激活^LENGTH=5^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public static readonly Field actived = FindByName(__.actived);

            ///<summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=备注^LENGTH=2000^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public static readonly Field note_text = FindByName(__.note_text);

            ///<summary></summary>
            public static readonly Field objid = FindByName(__.objid);

            ///<summary></summary>
            public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }

        /// <summary>取得字段名称的快捷方式</summary>
        class __
        {
            ///<summary>FLAGS=KMI-L^FORMAT=Uppercase^DATATYPE=String^PROMPT=对象^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public const String object_name = "object_name";

            ///<summary>FLAGS=KMI-L^FORMAT=Lowercase^DATATYPE=String^PROMPT=用户^LENGTH=40^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public const String user_id = "user_id";

            ///<summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=查询条件^LENGTH=2000^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public const String where_clause = "where_clause";

            ///<summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=描述^LENGTH=200^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public const String description = "description";

            ///<summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=激活^LENGTH=5^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public const String actived = "actived";

            ///<summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=备注^LENGTH=2000^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public const String note_text = "note_text";

            ///<summary></summary>
            public const String objid = "rowid";

            ///<summary></summary>
            public const String objversion = "rowversion";

        }
        #endregion
    }

    /// <summary>接口</summary>
    public partial interface Ifnd_vpd_policy
    {
       #region 属性
        /// <summary>FLAGS=KMI-L^FORMAT=Uppercase^DATATYPE=String^PROMPT=对象^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>

        String object_name { get; set; }


        /// <summary>FLAGS=KMI-L^FORMAT=Lowercase^DATATYPE=String^PROMPT=用户^LENGTH=40^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>

        String user_id { get; set; }


        /// <summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=查询条件^LENGTH=2000^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>

        String where_clause { get; set; }


        /// <summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=描述^LENGTH=200^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>

        String description { get; set; }


        /// <summary>FLAGS=AMIUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=激活^LENGTH=5^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>

        String actived { get; set; }


        /// <summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=备注^LENGTH=2000^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>

        String note_text { get; set; }


        /// <summary></summary>

        String rowid { get; set; }


        /// <summary></summary>

        DateTime? rowversion { get; set; }

        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值。</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        Object this[String name] { get; set; }
        #endregion
    }
}